#import <UIKit/UIView.h>

@class NSNotification;
@class UIPreferencesTable;
@class UIPreferencesTableCell;
@class UIPreferencesTextTableCell;
@class UISwitchControl;
@class UINavigationBar;
@class UIApplication;

@interface PreferencesView: UIView
{
	UINavigationBar *navBar;
	
	UIPreferencesTable *table;
	
	UIPreferencesTextTableCell *hostIPAddress, *hostPort;
	
	UIPreferencesTextTableCell *margin;
	UISwitchControl *moveAbsolute;
	
	UISwitchControl *gravity;
	
	UIApplication *parent;
}

- (void)dealloc;
- (void)save;

- (NSString *)hostIPAddress;
- (int)hostPort;
- (int)margin;
- (BOOL)moveAbsolute;
- (BOOL)gravity;

- (id)initWithFrame: (CGRect)frame parent: (UIApplication *)app;
- (void)reloadData;

// - (BOOL)table: (UITable *)aTable canSelectRow: (int)row;

// delegates
- (void)tableRowSelected: (NSNotification *)notification;

// data sources
- (int)numberOfGroupsInPreferencesTable: (UIPreferencesTable *)table;
- (int)preferencesTable: (UIPreferencesTable *)table numberOfRowsInGroup: (int)group;
- (id)preferencesTable: (UIPreferencesTable *)table titleForGroup: (int)group;
- (UIPreferencesTableCell *)preferencesTable: (UIPreferencesTable *)table cellForRow: (int)row inGroup: (int)group;

@end
